<template>
  <div class="hotel-overview">
    <div class="overview-section">
      <div class="section-header">
        <read-outlined class="section-icon" />
        <h2>酒店简介</h2>
      </div>
      <div class="content-card">
        <p class="description">{{ description }}</p>
      </div>
    </div>

    <div class="facilities-section">
      <div class="section-header">
        <apartment-outlined class="section-icon" />
        <h2>主要设施</h2>
      </div>
      <div class="facilities-grid">
        <div v-for="(facility, index) in facilities" :key="index" class="facility-item">
          <component :is="facility.icon" />
          <span>{{ facility.name }}</span>
        </div>
      </div>
    </div>

    <div class="policy-section">
      <div class="section-header">
        <file-protect-outlined class="section-icon" />
        <h2>酒店政策</h2>
      </div>
      <div class="content-card">
        <a-descriptions :column="{ xs: 1, sm: 2 }">
          <a-descriptions-item label="入住时间">14:00 后</a-descriptions-item>
          <a-descriptions-item label="退房时间">12:00 前</a-descriptions-item>
          <a-descriptions-item label="宠物">不可携带宠物</a-descriptions-item>
          <a-descriptions-item label="支付方式">支持信用卡支付</a-descriptions-item>
        </a-descriptions>
      </div>
    </div>
  </div>
</template>

<script setup lang="ts">
import { 
  WifiOutlined,
  CarOutlined,
  CoffeeOutlined,
  ExperimentOutlined,
  CustomerServiceOutlined,
  SafetyCertificateOutlined,
  GlobalOutlined,
  GiftOutlined,
  ReadOutlined,
  ApartmentOutlined,
  FileProtectOutlined
} from '@ant-design/icons-vue'

defineProps<{
  description: string
}>()

const facilities = [
  { name: '免费WiFi', icon: WifiOutlined },
  { name: '免费停车', icon: CarOutlined },
  { name: '餐厅', icon: CoffeeOutlined },
  { name: '游泳池', icon: ExperimentOutlined },
  { name: '24小时前台', icon: CustomerServiceOutlined },
  { name: '保险箱', icon: SafetyCertificateOutlined },
  { name: '外币兑换', icon: GlobalOutlined },
  { name: '礼品店', icon: GiftOutlined }
]
</script>

<style scoped>
.hotel-overview {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

.overview-section,
.facilities-section,
.policy-section {
  margin-bottom: 32px;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f0f0f0;
}

.section-icon {
  font-size: 24px;
  color: #1890ff;
}

h2 {
  font-size: 20px;
  margin: 0;
  color: #262626;
  font-weight: 600;
}

.content-card {
  background: white;
  padding: 24px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  transition: all 0.3s ease;
}

.content-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

.description {
  font-size: 16px;
  line-height: 1.8;
  color: #595959;
  margin: 0;
}

.facilities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.facility-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: all 0.3s ease;
  color: #595959;
}

.facility-item:hover {
  background: #f0f7ff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.facility-item .anticon {
  font-size: 18px;
  color: #1890ff;
}

:deep(.ant-descriptions-item-label) {
  color: #8c8c8c;
  font-weight: 500;
}

:deep(.ant-descriptions-item-content) {
  color: #262626;
}

@media (max-width: 768px) {
  .facilities-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
}
</style> 